package com.ruoyi.web.message.domain;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 消息对象 message
 *
 * @author 范书铭
 * @date 2024-10-11
 */
@ApiModel(value =  "消息",description = "")
@TableName(resultMap = "com.ruoyi.web.message.mapper.MessageMapper.MessageResult")
@Data
@EqualsAndHashCode(callSuper = true)
public class Message extends BaseEntity {
        private static final long serialVersionUID = 1L;

        /** $column.columnComment */
        @TableId(value = "id", type = IdType.AUTO)
        private Long id;

        /** 发送人姓名 */
        @ApiModelProperty(name = "发送人姓名", notes = "")
        @Excel(name = "发送人姓名")
        private String sendFromUserName;

        /** 消息内容 */
        @ApiModelProperty(name = "消息内容", notes = "")
        @Excel(name = "消息内容")
        private String messageContent;

        /** 消息类型 */
        @ApiModelProperty(name = "消息类型", notes = "")
        @Excel(name = "消息类型")
        private Long messageType;

        /** 消息关联数据ID */
        private Long contactDataId;

        @Override
        public String toString() {
                return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                        .append("id", getId())
                        .append("sendFromUserName", getSendFromUserName())
                        .append("messageContent", getMessageContent())
                        .append("messageType", getMessageType())
                        .append("contactDataId", getContactDataId())
                        .append("remark", getRemark())
                        .append("updateTime", getUpdateTime())
                        .append("updateBy", getUpdateBy())
                        .append("createTime", getCreateTime())
                        .append("createBy", getCreateBy())
                        .toString();
        }
}